'use strict';

function choose_common_elements(collection_a, collection_b) {

let result = [];
for(let item1 of collection_a){
  for(let item2 of collection_b){
    if(item1===item2){
      result.push(item1);
    }
  }
}
console.log(result);
return result;

  
}
choose_common_elements( ["a", "e", "h", "t", "f", "c", "g", "b", "d"], ["a", "d", "e", "f"]);
module.exports = choose_common_elements;
